package com.changgou.order.feign;

import com.changgou.entity.Result;
import com.changgou.order.pojo.OrderItem;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient(name = "order")
public interface CartFeign {


    /**
     * 添加购物车
     * @param skuId
     * @param num
     * @return
     */
    @GetMapping("/cart/addCart")
    public Result add(@RequestParam String skuId, @RequestParam Integer num);



    /***
     * 查询用户购物车列表
     * @return
     */
    @GetMapping(value = "/cart/list")
    public Map list();




    @PostMapping("/cart/buylist1")
    @ResponseBody
    public String buylist1( @RequestBody List<OrderItem> list);

}
